<!DOCTYPE html>
<html>

<head>
    <title>平台</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="__PUBLIC__/libs/frozenui/css/frozen.css">
    <link rel="stylesheet" href="__PUBLIC__/Mobi/style.css">
    <script src="__PUBLIC__/Anal/js/jquery.js"></script>
</head>

<body>
    <div class="ui-poptips ui-poptips-success" id="alt" style="display:none;">
        <div class="ui-poptips-cnt"><i></i>温馨提示内容</div>
    </div>
    <div class="codetype">
        <ul class="ui-row" id="part">
            <li class="ui-col ui-col-50">销售码类型</li>
            <li class="ui-col ui-col-50" style="text-align:right;">23</li>
        </ul>
    </div>
    <div class="ui-form ui-border-t">
        <form action="{:U('Apn/codeapply')}" method="post" onsubmit="return onoad();">
            <div class="ui-form-item ui-border-b">
                <label>姓名</label>
                <input type="text" name='name' placeholder="请输入您的姓名." />
            </div>
            <div class="ui-form-item ui-border-b">
                <label>手机</label>
                <input type="text" name='phone' placeholder="请输入您的11位电话号码." />
            </div>
            <input type="hidden" name="type" value="23" />
            <div class="ui-form-item" style="text-align: center;">
                <a href="http://www.yubao21.com/user_agreement.jpg">
                    推广用户协议
                </a>
            </div>
            <div class="ui-btn-wrap" style="text-align:center;">
                <button type="submit" class="ui-btn" id='btn1'>提交</button>
            </div>
        </form>
    </div>
    <script>
    //$("#alt").hide();
    function onoad() {
        var phone = $("input[name=phone]").val();
        var reg = /^0?1[3|4|5|8][0-9]\d{8}$/;
        var name = $("input[name=name]").val();
        if (name.length == 0) {
            $("#alt div").html("<i></i>姓名不能为空!");
            $("#alt").fadeToggle(300);
            $("#alt").fadeToggle(3000);
            return false;
        }
        if (phone.length == 0 || !reg.test(phone)) {
            $("#alt div").html("<i></i>手机号码错误!");
            $("#alt").fadeToggle(300);
            $("#alt").fadeToggle(3000);
            return false;
        }
        return true;
    }
    </script>
</body>

</html>